//
//  XLToast.m
//  campus
//
//  Created by xl on 2019/12/21.
//  Copyright © 2019 xl. All rights reserved.
//

#import "XLToast.h"

@implementation XLToast

+ (void)showComonMessage:(NSString *)message {
    UIWindow *window = [UIApplication sharedApplication].keyWindow;
    [AUToast presentModalToastWithin:window withIcon:AUToastIconNone text:message duration:XLShowMessageDelayTime logTag:@"common" completion:nil];
}

+ (void)showErrorMessage:(NSString *)message {
    UIWindow *window = [UIApplication sharedApplication].keyWindow;
    [AUToast presentModalToastWithin:window withIcon:AUToastIconFailure text:message duration:XLShowMessageDelayTime logTag:@"error" completion:nil];
}

+ (void)showSuccessMessage:(NSString *)message {
    UIWindow *window = [UIApplication sharedApplication].keyWindow;
    [AUToast presentModalToastWithin:window withIcon:AUToastIconSuccess text:message duration:XLShowMessageDelayTime logTag:@"success" completion:nil];
}

+ (AUToast *)showLoadingTitle:(NSString *)title superView:(UIView *)superView{
    return [AUToast presentModalToastWithin:superView withIcon:AUToastIconLoading text:title duration:XLShowLoadingDelayTime logTag:@"loading" completion:nil];
}

@end
